package cn.study.service.impl;

import cn.study.entity.StudyTestQuestionsMore;
import cn.study.entity.StudyTestQuestionsOne;
import cn.study.mapper.StudyTestQuestionsMoreMapper;
import cn.study.mapper.StudyTestQuestionsOneMapper;
import cn.study.service.StudyTestQuestionsMoreService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 多选试题表 服务实现类
 * </p>
 *
 * @author qiao
 * @since 2020-06-22
 */
@Service
public class StudyTestQuestionsMoreServiceImpl extends ServiceImpl<StudyTestQuestionsMoreMapper, StudyTestQuestionsMore> implements StudyTestQuestionsMoreService {
    @Autowired
    StudyTestQuestionsMoreMapper studyTestQuestionsMoreMapper;
    @Override
    public List<StudyTestQuestionsMore> moreLikeList(String moreval) {
        QueryWrapper<StudyTestQuestionsMore> wrapper = new QueryWrapper<>();
        wrapper
                .like("test_questions_more_opic",moreval)
                .orderByDesc("create_time");
        ;
        return studyTestQuestionsMoreMapper.selectList(wrapper);
    }
}
